package com.woniuxy.health.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.health.auth.entity.Perm;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PermMapper extends BaseMapper<Perm> {
//    @Select("select * from rbac_perms where userid=#{userId}")
//    public List<Perm> getPermsByUsreId(Integer userId);
//
//    @Select("select * from rbac_perms")
//    public List<Perm> getPerms();


    @Select("select * from rbac_role_perms rrp,rbac_perms rp where rrp.permid=rp.id and rrp.roleid=#{id}")
    List<Perm> findPermsById(int id);
}